* Apply to: roadmaps_1.dta
* Description:  Figure A2 in the OA

clear

set more off


* All respondents (without demographic covariates)

clear

import excel "...\1805 Roadmaps\Table A8 simqi.xlsx", sheet("Sheet1") firstrow

drop if model==.
drop if model < 3

* Create black values to facilitate bar spacing

set obs 8
replace model = 1 in 8
replace treatment = "blank1" in 8
replace estimate = 0 in 8
replace change = 0 in 8


* Create order term

gen order1 = 0
replace order1 = 1 if treatment=="control" & group=="base_any"
replace order1 = 2 if treatment=="allinfo"
replace order1 = 3 if treatment=="blank1"
replace order1 = 4 if treatment=="control" & group=="base"
replace order1 = 5 if treatment=="guide"
replace order1 = 6 if treatment=="party"
replace order1 = 7 if treatment=="perspat"
replace order1 = 8 if treatment=="perpty"


sort order1


* Figure A2a (First Difference Spatial Advantage)

graph bar change if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(-.30(.10).63) legend(off) ///
	 ytitle("") ///
	 yline(0, lcolor(black)) ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs6)) ///
	 bar(6, lcolor(black) bcolor(gs12)) ///
	 bar(7, lcolor(black) bcolor(gs0)) ///
	 bar(8, lcolor(black) bcolor(gs4)) ///
	 text(.26 8 "{bf:.14}", size(large)) ///
	 text(.42 20.5 "{bf:.30 *}{superscript:a}", size(large)) ///
	 text(.26 44.5 "{bf:.14}", size(large)) ///
	 text(.43 57 "{bf:.31}{superscript:a}", size(large)) ///
	 text(.55 67.5 "{bf:.43 *}{superscript:a}", size(large)) ///
	 text(.44 80 "{bf:.32}{superscript:a}", size(large)) ///
	 text(.32 92.5 "{bf:.20}{superscript:a}", size(large)) ///
	 text(-.38 8 "{bf:Control}" " ") ///
	 text(-.38 19.5 "{bf:Any}" "{bf:Info}") ///
	 text(-.38 43.5 "{bf:Control}" " ") ///
	 text(-.38 56 "{bf:Voter}" "{bf:Guide}") ///
	 text(-.38 67.5 "{bf:Party}" "{bf:Cues}") ///
	 text(-.38 80 "{bf:Spatial}" "{bf:Map}") ///
	 text(-.38 92.5 "{bf:Party +}" "{bf:Map}") ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))


* Figure A2b (Predicted Probability Support Moderate)

graph bar estimate if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(0(.10).93) legend(off) ///
	 ytitle("") ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs6)) ///
	 bar(6, lcolor(black) bcolor(gs12)) ///
	 bar(7, lcolor(black) bcolor(gs0)) ///
	 bar(8, lcolor(black) bcolor(gs4)) ///
	 text(.44 8 "{bf:.32}", size(large)) ///
	 text(.39 20.5 "{bf:.27}", size(large)) ///
	 text(.44 44.5 "{bf:.32}", size(large)) ///
	 text(.47 57 "{bf:.35}", size(large)) ///
	 text(.27 67.5 "{bf:.15 *#}", size(large)) ///
	 text(.44 80 "{bf:.32}", size(large)) ///
	 text(.32 92.5 "{bf:.20}", size(large)) ///
	 text(-.08 8 "{bf:Control}" " ") ///
	 text(-.08 19.5 "{bf:Any}" "{bf:Info}") ///
	 text(-.08 43.5 "{bf:Control}" " ") ///
	 text(-.08 56 "{bf:Voter}" "{bf:Guide}") ///
	 text(-.08 67.5 "{bf:Party}" "{bf:Cues}") ///
	 text(-.08 80 "{bf:Spatial}" "{bf:Map}") ///
	 text(-.08 92.5 "{bf:Party +}" "{bf:Map}") ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))


* All respondents (with demographic covariates)

clear

import excel "...\1805 Roadmaps\Table A8 simqi.xlsx", sheet("Sheet1") firstrow

drop if model==.
drop if model > 2

* Create black values to facilitate bar spacing

set obs 8
replace model = 1 in 8
replace treatment = "blank1" in 8
replace estimate = 0 in 8
replace change = 0 in 8


* Create order term

gen order1 = 0
replace order1 = 1 if treatment=="control" & group=="any"
replace order1 = 2 if treatment=="allinfo"
replace order1 = 3 if treatment=="blank1"
replace order1 = 4 if treatment=="control" & group=="all"
replace order1 = 5 if treatment=="guide"
replace order1 = 6 if treatment=="party"
replace order1 = 7 if treatment=="perspat"
replace order1 = 8 if treatment=="perpty"


sort order1


* Figure A2c (First Difference Spatial Advantage)

graph bar change if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(-.30(.10).63) legend(off) ///
	 ytitle("") ///
	 yline(0, lcolor(black)) ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs6)) ///
	 bar(6, lcolor(black) bcolor(gs12)) ///
	 bar(7, lcolor(black) bcolor(gs0)) ///
	 bar(8, lcolor(black) bcolor(gs4)) ///
	 text(.27 8 "{bf:.15}", size(large)) ///
	 text(.37 20.5 "{bf:.25}{superscript:a}", size(large)) ///
	 text(.26 44.5 "{bf:.14}", size(large)) ///
	 text(.37 57 "{bf:.25}{superscript:a}", size(large)) ///
	 text(.49 67.5 "{bf:.37 *}{superscript:a}", size(large)) ///
	 text(.41 80 "{bf:.29}{superscript:a}", size(large)) ///
	 text(.27 92.5 "{bf:.15}{superscript:a}", size(large)) ///
	 text(-.38 8 "{bf:Control}" " ") ///
	 text(-.38 19.5 "{bf:Any}" "{bf:Info}") ///
	 text(-.38 43.5 "{bf:Control}" " ") ///
	 text(-.38 56 "{bf:Voter}" "{bf:Guide}") ///
	 text(-.38 67.5 "{bf:Party}" "{bf:Cues}") ///
	 text(-.38 80 "{bf:Spatial}" "{bf:Map}") ///
	 text(-.38 92.5 "{bf:Party +}" "{bf:Map}") ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))


* Figure A2d (Predicted Probability Support Moderate)

graph bar estimate if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(0(.10).93) legend(off) ///
	 ytitle("") ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs6)) ///
	 bar(6, lcolor(black) bcolor(gs12)) ///
	 bar(7, lcolor(black) bcolor(gs0)) ///
	 bar(8, lcolor(black) bcolor(gs4)) ///
	 text(.39 8 "{bf:.27}", size(large)) ///
	 text(.35 20.5 "{bf:.23}", size(large)) ///
	 text(.39 44.5 "{bf:.27}", size(large)) ///
	 text(.44 57 "{bf:.32}", size(large)) ///
	 text(.26 67.5 "{bf:.14 #}", size(large)) ///
	 text(.39 80 "{bf:.27}", size(large)) ///
	 text(.28 92.5 "{bf:.16 #}", size(large)) ///
	 text(-.08 8 "{bf:Control}" " ") ///
	 text(-.08 19.5 "{bf:Any}" "{bf:Info}") ///
	 text(-.08 43.5 "{bf:Control}" " ") ///
	 text(-.08 56 "{bf:Voter}" "{bf:Guide}") ///
	 text(-.08 67.5 "{bf:Party}" "{bf:Cues}") ///
	 text(-.08 80 "{bf:Spatial}" "{bf:Map}") ///
	 text(-.08 92.5 "{bf:Party +}" "{bf:Map}") ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))

* End
